package org.wyn.mongodb.bean;

import java.util.ArrayList;
import java.util.List;

import org.bson.types.ObjectId;
import org.wyn.common.Table;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import com.google.code.morphia.annotations.Indexed;

/**
 * 相册实体类
 * @author wyn
 *
 */
@Entity(value = Table.CollectionName.ALBUM, noClassnameStored = true)
public class Album {
	/**相册id*/
	@Id
	private ObjectId id;
	/**
	 * 创建人userName
	 */
	@Indexed
	private String userName;
	/**相册名*/
	private String albumName;
	/**创建时间*/
	@Indexed
	private long createTime;
	/**
	 * 相册类型：common一般用户创建的相册<br>
	 * portrait 系统为每个用户创建的头像相册
	 */
	private String albumType;
	/**相册描述*/
	private String description;
	/**相册浏览次数*/
	private int visitCount;
	/**相册评论*/
	private List<Comment> comments;
	/**相册中图片*/
	private List<Picture> pictures = new ArrayList<Picture>();
	public ObjectId getId() {
		return id;
	}
	public void setId(ObjectId id) {
		this.id = id;
	}
	public String getUserName() {
		return userName;
	}
	public void setUserName(String userName) {
		this.userName = userName;
	}
	public String getAlbumName() {
		return albumName;
	}
	public void setAlbumName(String albumName) {
		this.albumName = albumName;
	}
	public long getCreateTime() {
		return createTime;
	}
	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}
	public int getVisitCount() {
		return visitCount;
	}
	public void setVisitCount(int visitCount) {
		this.visitCount = visitCount;
	}
	public List<Comment> getComments() {
		return comments;
	}
	public void setComments(List<Comment> comments) {
		this.comments = comments;
	}
	public List<Picture> getPictures() {
		return pictures;
	}
	public void setPictures(List<Picture> pictures) {
		this.pictures = pictures;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public String getAlbumType() {
		return albumType;
	}
	public void setAlbumType(String albumType) {
		this.albumType = albumType;
	}
}
